<%@page import="com.kavitha.db.dataobject.Employee"%>
<%@page import="com.kavitha.db.util.EmployeeUtil"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Edit Employee</title>
</head>
<body>
	<form name="edit" action="index.jsp" method="post"> 
	<label>Employee Detail</label><br/> <br/>
	<%
	String id = request.getParameter("id");
	Employee e = EmployeeUtil.getEmployee(id);
	if(e!=null){
	%>
		<label>First Name:</label>
		<input type="text" name="firstName" value="<%=e.getFirstName()%>"/><br/> <br/>
		<label>Last Name :</label>
		<input type="text" name="lastName" value="<%=e.getLastName()%>"/><br/> <br/>
		<label>Email Id  :</label>
		<input type="text" name="emailId" value="<%=e.getEmailId()%>"/><br/> <br/>
		<label>Phone No  :</label>
		<input type="text" name="phoneNo" value="<%=e.getPhoneNo()%>"/><br/> <br/>
		<label>Dob:       </label>
		<input type="text" name="dob" value="<%=e.getDob()%>"/><br/> <br/>
		<input type="hidden" name="edit" value="edit">
		<input type="hidden" name="id" value="<%=id%>">
		<input type="submit" id="save" value="Save"/>
	<% 
	}
	%>
	</form>
</body>
</html>